from PyQt5.QtWidgets import*
from PyQt5.QtCore import*
from PyQt5.QtGui import*
import sys

#帮我直接运行此文件，可以加载到上级目录的ui包
#sys.path.append('../')

from ui.Ui_my_window import Ui_MainWindow
from views.widget_upper_car import Form

class MainWindow(QMainWindow):
    
    def __init__(self,parent=None):
        super().__init__(parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        
        self.init_ui()
        
    def init_ui(self):
        self.ui.tabWidget.addTab(QWidget(self),"网络助手")
        self.ui.tabWidget.addTab(QWidget(self),"蓝牙助手")
        self.ui.tabWidget.addTab(QWidget(self),"串口助手")
        self.ui.tabWidget.addTab(Form(self),"小车上位机")
        self.ui.tabWidget.addTab(QWidget(self),"物联网平台")
        self.ui.tabWidget.addTab(QWidget(self),"其它")
        #默认选中最后一个标签
        self.ui.tabWidget.setCurrentIndex(3)
    
if __name__ == '__main__':
    app = QApplication(sys.argv)
    widget = MainWindow()
    widget.show() 
    sys.exit(app.exec_())   